package it.univaq.mwt.tp;

import it.univaq.mwt.tp.ItemDesc;
import java.io.Serializable;
import javax.persistence.*;

/**
 * Entity implementation class for Entity: Item
 * 
 */
@Entity
public class Item implements Serializable {

	private int itemID;
	private float price;
	private int stock;
	private ItemDesc itemDesc;
	private static final long serialVersionUID = 1L;

	public Item() {
		super();
	}

	
	public Item(int itemID, float price, int stock, ItemDesc itemDesc) {
		this.itemID = itemID;
		this.price = price;
		this.stock = stock;
		this.itemDesc = itemDesc;
	}


	@Id
	public int getItemID() {
		return this.itemID;
	}

	public void setItemID(int itemID) {
		this.itemID = itemID;
	}

	public float getPrice() {
		return this.price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getStock() {
		return this.stock;
	}

	public void setStock(int stock) {
		this.stock = stock;
	}

	@Embedded
	public ItemDesc getItemDesc() {
		return this.itemDesc;
	}

	public void setItemDesc(ItemDesc itemDesc) {
		this.itemDesc = itemDesc;
	}

}
